Comparison of turboGliph and ClustIRR graphs using ground truth data and turboGliphs input data for two experiments.
# data
data("gliph_input_data")
data("CDR3ab")
CDR3ab$CDR3a <- NULL
# set the random seed for sampling reproducibility
set.seed(987)
# sample 500 sequences from the reference dataset as sample dataset
data_sample <- data.frame(CDR3b = CDR3ab[sample(x = 1:nrow(CDR3ab),
size = 500,
replace = FALSE),])
# artificially enrich motif 'RQWW' inside sample dataset
substr(x = data_sample$CDR3b[1:20], start = 6, stop = 9) <- "RQWW"
# add the artificial clonal expansion of two sequences to the sample dataset
clones <- data.frame(CDR3b = rep(x = c("CATSRAAKPDGLAALETQYF",
"CATSRAAKPDGLAALSTQYF"),
times = 15))
data_sample <- rbind(data_sample, clones)
s = data_sample
r = CDR3ab
ks = 4
cores = parallel::detectCores()
control = list(
B = 1000,
global_max_dist = 1,
local_max_fdr = 0.01,
local_min_ove = 2,
local_min_o = 3,
trim_flank_aa = 3,
low_mem = FALSE,
global_pairs = NULL
)
plot_network(out_tg1_gt) # turbogliph 1 - ground truth expansion
## Preparing graph nodes and edges.
## Drawing the graph.
plot_network(out_tg2_gt) # turbogliph 2 - ground truth expansion
## Preparing graph nodes and edges.
## Restrict local similarities to sequences with motif position varying
## between 1 positions.
## Restrict global connections to sequences with a BLOSUM62 value
## for the amino acid substitution greater or equal to zero.
## Drawing the graph.
plot_graph(out_c1_gt) # clustirr 1 - ground truth expansion
plot_graph(out_c2_gt) # clustirr 2 - ground truth expansion
plot_graph(out_c3_gt) # clustirr 3 - ground truth expansion
plot_network(out_tg1_gliph) # turbogliph 1 - gliph input data
## Preparing graph nodes and edges.
## Drawing the graph.
plot_network(out_tg2_gliph) # turbogliph 2 - gliph input data
## Preparing graph nodes and edges.
## Restrict local similarities to sequences with motif position varying
## between 1 positions.
## Restrict global connections to sequences with a BLOSUM62 value
## for the amino acid substitution greater or equal to zero.
## Drawing the graph.
plot_graph(out_c1_gliph) # clustirr 1 - gliph input data
plot_graph(out_c2_gliph) # clustirr 2 - gliph input data
plot_graph(out_c3_gliph) # clustirr 3 - gliph input data